<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/12/10
  Time: 11:06
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

    <form id="data_fm" method="post">
        <div class="inputContainer">
            <input id="path" name="path" value="${obj.data.path}" style="display: none"/>
            <input id="suffix" name="suffix" value="${obj.data.suffix}" style="display: none"/>
        </div>
        <div class="d1o2">
            <span class="label">版本名称</span>
            <div class="inputContainer">
                <input id="vName" class="inputStyles" name="vName" value="${obj.data.vName}"/>
            </div>
        </div>
        <div class="d1o2">
            <span class="label">文件名称</span>
            <div class="inputContainer">
                <input id="file_name" class="inputStyles" name="name" value="${obj.data.name}"/>
            </div>
        </div>
        <div class="d1o2">
            <span class="label">版本号</span>
            <div class="inputContainer">
                <input id="vCode" class="inputStyles" name="vCode" value="${obj.data.vCode}"/>
            </div>
        </div>
        <div class="d1o2">
            <span class="label">上一版本号</span>
            <div class="inputContainer">
                <input id="pvCode" class="inputStyles" name="pvCode" value="${obj.data.pvCode}"
                       placeholder="第一次上传该文件，此处可不填"/>
            </div>
        </div>

        <div class="d1o2">
            <span class="label">文件类型</span>
            <div class="inputContainer">
                <select id="type" class="inputStyles" name="type">
                    <option value="${obj.data.type}" selected="selected">${obj.data.typeName}</option>
                    <c:forEach var="type" items="${obj.typeDrop}" varStatus="index">
                        <c:if test="${obj.data.type != type.value}">
                            <option value=${type.value}>${type.name}</option>
                        </c:if>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="d1">
            <label class="label" for="vDesc">版本描述</label>
            <div class="inputContainer">
                <textarea class="dTextArea TextAreaStyles" id="vDesc" name="vDesc">${obj.data.vDesc}</textarea>
            </div>
        </div>
    </form>
    <form id="fm_file" method="post" novalidate enctype="multipart/form-data">
        <div class="d1">
            <label class="label" for="fileToUpload">文件上传</label>
            <div class="inputContainer">
                <input id="fileToUpload" name="fileToUpload"  type="file" size="40" onchange="uploadFile()">
            </div>
        </div>
        <c:if test="${obj.isModify == true}">
            <div id="path_div" class="d1">
                <label class="label" for="fileToUpload">文件路径</label>
                <div class="inputContainer">
                    <input id="file_path" class="inputStyles" value="${obj.data.path}">
                </div>
            </div>
        </c:if>
    </form>
    <p id="validate_tips" class="warning"></p>
